package org.example.proxy.cglib;

import net.sf.cglib.proxy.InvocationHandler;

import java.lang.reflect.Method;

/**
 * @author : RXK
 * Date : 2021/6/4 19:12
 * Code Less Think More
 * Desc:
 */
public class InvocationCallback implements InvocationHandler {

    private final InvokeObject object;

    public InvocationCallback(InvokeObject object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return method.invoke(object,args);
    }
}
